package com.app.bimo.library_db;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import androidx.annotation.Nullable;

@Entity
public class FontTypeData {
    @Id
    private String id;
    private String fontName;

    private int type;//字体类型

    private String downloadUrl;
    private String fileSize;
    private int dayIcon;

    private int nightIcon;



    @Transient
    private float progress = 0;
    /**
     * 字体状态
     * 0 未下载，1下载中，2已下载（未使用）  3已使用
     */
    private int status;


    @Generated(hash = 2061977276)
    public FontTypeData(String id, String fontName, int type, String downloadUrl,
            String fileSize, int dayIcon, int nightIcon, int status) {
        this.id = id;
        this.fontName = fontName;
        this.type = type;
        this.downloadUrl = downloadUrl;
        this.fileSize = fileSize;
        this.dayIcon = dayIcon;
        this.nightIcon = nightIcon;
        this.status = status;
    }

    @Generated(hash = 715538116)
    public FontTypeData() {
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFontName() {
        return fontName;
    }

    public void setFontName(String fontName) {
        this.fontName = fontName;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public float getProgress() {
        return progress;
    }

    public void setProgress(float progress) {
        this.progress = progress;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public void setIcon(int dayIcon ,int nightIcon) {
        this.dayIcon = dayIcon;
        this.nightIcon = nightIcon;
    }


    @Override
    public boolean equals(@Nullable Object obj) {
        FontTypeData data = (FontTypeData) obj;
        return data.getId().equals(id);
    }

    public int getType() {
        return this.type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getDayIcon() {
        return this.dayIcon;
    }

    public void setDayIcon(int dayIcon) {
        this.dayIcon = dayIcon;
    }


    public int getNightIcon() {
        return this.nightIcon;
    }

    public void setNightIcon(int nightIcon) {
        this.nightIcon = nightIcon;
    }



}
